package be.gnx.fogo.application.dao;

import be.gnx.fogo.application.model.Country;
import be.gnx.fogo.application.model.ISO_3166_1_alpha2;

public class CountryDao extends ObjectDao<Country, String> {

  public CountryDao() {
    super(Country.class, "iso_3166_1_alpha2_as_string");
  }

  public Country getCountry(String country) {
    if (country != null) {
      return get(ISO_3166_1_alpha2.typeOf(country).getAlpha2());
    }
    return null;
  }

}
